const joi = require("joi");

const name = joi.string().pattern(/^[\S]{1,12}$/).required();
const price = joi.number().min(0).required();
const intro = joi.string().required();
const stock = joi.number().integer().min(1).required();
const type_id = joi.number().integer().required();

const add_goods_schema = {
  body: {
    name,
    price,
    intro,
    stock,
    type_id
  }
}

module.exports = {
  add_goods_schema,
}